package com.example.onlinereadingsystem.demos.web.controller.web;

import com.example.onlinereadingsystem.demos.web.dto.vo.UserBookShelfListVo;
import com.example.onlinereadingsystem.demos.web.service.UserBookShelfService;
import com.example.onlinereadingsystem.demos.web.util.Result;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Description 书架页接口
 * @Author ljm
 * @Date 2024/11/6
 */
@RestController
@RequestMapping("/web/bookshelf")
public class UserBookShelfController {

    @Autowired
    private UserBookShelfService userBookShelfService;

    /**
     * @auther ljm
     * @create 2024/11/6
     * @describe 根据用户id获取书架列表
     */
    @GetMapping("/list")
    public Result<List<UserBookShelfListVo>> list(@Param("id") String id) {
        //System.out.println(id);
        return userBookShelfService.list(id);
    }
}
